package com.board.action.board;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.board.action.Action;
import com.board.dto.BoardRepDto;
import com.board.servlce.BoardRepService;
import com.board.servlceimple.BoardRepServiceImp;
import com.board.servlet.helper.ActionForward;

public class BoardListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		ActionForward forward=new ActionForward();
		BoardRepService service=BoardRepServiceImp.getInstance();
		
		List<BoardRepDto> boardDtos=service.getAllBoards();
		request.setAttribute("lists",boardDtos);
		forward.setUrl("list");
		
		return forward;
	}

}
